﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Cecil;
using NDasm.Core.UI.Base;

namespace NDasm.Core.UI.Tree
{
    public abstract class MemberNodeViewModel : HierarchicalViewModel
    {        
        protected MemberNodeViewModel(IMemberDefinition member, string scope) : base(scope)
        {
            Member = member;
        }

        public readonly IMemberDefinition Member;

        public string Name
        {
            get { return Member.Name; }
        }

        public bool IsSameMember(IMemberDefinition member)
        {
            return Member.GetType() == member.GetType() && Member.FullName == member.FullName;
        }
    }
}
